package com.heimait.chouxianglei.demo;

public abstract class animal {
    private String name;
    private int age;

    public animal() {
    }

    public animal(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
//    行为是不一样的，子类必须自己重写这个方法内容，使用抽象类约束
    public abstract void action();
}
